import request from '../utils/request'

export function build(params) {
  return request({
    url: '/member/order/build',
    method: 'get',
    params: params
  })
}

export function create(data,params) {
  return request({
    url: '/member/order/create',
    data: data,
    method: 'POST',
    params: params
  })
}

export function list(params) {
  return request({
    url: '/member/order/list',
    method: 'get',
    params: params
  })
}

export function orderList(params) {
  return request({
    url: '/member/order/orderList',
    method: 'get',
    params: params
  })
}

export function find(id) {
  return request({
    url: '/member/order/find/' + id,
    method: 'get'
  })
}

export function cancel(id) {
  return request({
    url: '/member/order/cancel/' + id,
    method: 'post'
  })
}

export function returns(data, id) {
  return request({
    url: '/member/order/returns/' + id,
    method: 'post',
    data: data
  })
}


export function received(id) {
  return request({
    url: '/member/order/received/' + id,
    method: 'post'
  })
}

export function reminder(id) {
  return request({
    url: '/member/order/reminder/' + id,
    method: 'post'
  })
}

export function calculate(data) {
  return request({
    url: '/member/order/calculate',
    method: 'post',
    data: data
  })
}

export function payment(id) {
  return request({
    url: '/member/order/payment/' + id,
    method: 'post'
  })
}

export function paymentFirst(id) {
  return request({
    url: '/member/order/paymentFirst/' + id,
    method: 'post'
  })
}
export function del(id) {
  return request({
    url: '/member/order/del/'+ id,
    method: 'post'
  })
}


export function summary() {
  return request({
    url: '/member/order/summary',
    method: 'post'
  })
}

export function check_shipping(data,params){
  return request({
    url:'/member/order/check_shipping',
    method:'post',
    data:data,
    params: params
  })
}

export function pickup_qrcode(params) {
  return request({
    url: '/member/order/pickup_qrcode',
    method: 'get',
    params:params
  })
}
